package org.jeecg.modules.demo.weixin.smtstoreduserpoint.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.demo.weixin.entity.SmtStoredUserPoint;

import java.math.BigDecimal;

/**
 * @Description: 用户门店余额
 * @Author: jeecg-boot
 * @Date:   2023-11-17
 * @Version: V1.0
 */
public interface ISmtStoredUserPointService extends IService<SmtStoredUserPoint> {
    /**
     * 扣除    订单 （退）
     * @param price
     * @param priceGive
     * @param type
     * @param userId
     * @param orderNo
     * @return
     */
    Boolean subPrice(BigDecimal price, BigDecimal priceGive, Integer type, Integer userId,String merId,  String orderNo);

    /**
     * 增加   订单  （加）
     * @param price
     * @param priceGive
     * @param type
     * @param userId
     * @param orderNo
     * @return
     */
    Boolean addPrice(BigDecimal price, BigDecimal priceGive, Integer type, Integer userId,String merId, String orderNo);


    /**
     * 储值卡退款逻辑
     * @param price
     * @param priceGive
     * @param userId
     * @param merId
     * @param orderNo
     * @return
     */
    BigDecimal subPoint(BigDecimal price, BigDecimal priceGive, Integer userId, String merId, String orderNo);
}
